// 用于基础组件根据不同的值来获取不同的url
export function geturl(urlid) {
  var comList = [

    // 查询种养情况
    {
      urlid: '/mainvariety',
      url: 'v1/plantingBreeding/query',
      met: 'get'
    },
    // 农机信息查询
    {
      urlid: '/agrimachinetype',
      url: 'v1/agriculturalMachineryType/query',
      met: 'get'
    },
    // 查询主要投入情况
    {
      urlid: '/maininputs',
      url: 'v1/invest/query',
      met: 'get'
    },
    // normalTable
    // 设施详情信息
    {
      urlid: '/facilityinfo',
      url: 'v1/facility/query',
      met: 'get'
    },
    // 获取服务列表
    {
      urlid: '/serviceproject',
      url: 'v1/serviceConfig/queryByOrganizationMark',
      met: 'get'
    },
    // 获取增收列表数据
    {
      urlid: '/addproject',
      url: 'v1/commonIncome/queryByOrganizationMark',
      met: 'get'
    },
    // 农机信息查询
    {
      urlid: '/agrimachineuserinfo',
      url: 'v1/agriculturalMachineryType/query',
      met: 'get'
    },
    // 查询投入品情况
    {
      urlid: '/inputstype',
      url: 'v1/inputType/query',
      met: 'get'
    },
    // picEcarousel
    // 查询相关图片
    {
      urlid: '/picture',
      url: 'v1/commonPicture/queryByOrganizationMark',
      met: 'get'
    },
    // numberRoll
    // 带动人数带动户数带动金额
    {
      urlid: '/greenNumberRoll',
      url: 'v1/drive/queryByOrganizationMark',
      met: 'get'
    },
    // numberRoll
    // 翻牌器
    {
      urlid: '/bigNumberRoll',
      url: 'v1/drive/queryByOrganizationMark',
      met: 'get'
    },
    {
      urlid: '/smallNumberRoll',
      url: 'v1/drive/queryByOrganizationMark',
      met: 'get'
    },
    // // 带动户数
    // {
    //   urlid: '/greenNumberRoll',
    //   url: 'v1/drive/queryByOrganizationMark',
    //   met: 'get'
    // },
    // // 带动金额
    // {
    //   urlid: '/greenNumberRoll',
    //   url: 'v1/drive/queryByOrganizationMark',
    //   met: 'get'
    // },
    // picNumberRoll
    // 查询收入情况
    {
      urlid: '/valuecondition',
      url: 'v1/incomeSituation/query',
      met: 'get'
    },
    // lineEcarousel
    // 种养周期
    {
      urlid: '/planttime',
      url: 'v1/plantingBreeding/query',
      met: 'get'
    },
    // barcharts
    // 各收入类型对比
    {
      urlid: '/outputEachIncomeType',
      url: 'v1/incomeSituation/query',
      met: 'get'
    },
    // 吸纳当地劳动力
    {
      urlid: "/manpower",
      url: 'v1/post/queryPoit',
      met: 'get'
    },
    // 就业岗位（第2个)
    {
      urlid: '/servicetech',
      url: 'v1/postType/queryPostTypeNumber',
      met: 'get'
    },
    // 现状增收
    {
      urlid: '/currentIncomeIncrease',
      url: 'v1/increase/queryPresentIncrease',
      met: 'get'
    },
    // 目标增收数据
    {
      urlid: '/targetIncomeIncrease',
      url: 'v1/increase/queryTarget',
      met: 'get'
    },
    // 涉及村民户数（户）
    {
      urlid: '/numberVillagersInvolved',
      url: 'v1/villager/queryByOrganizationMark',
      met: 'get'
    },
    // 亩均增收（万元）
    {
      urlid: '/increaseIncomePerMu',
      url: 'v1/average/queryByOrganizationMark',
      met: 'get'
    },
    // 各收入类型产值同比
    {
      urlid: '/outputEachIncomeType',
      url: 'v1/inputType/query',
      met: 'get'
    },
    // 各农副产品产能
    {
      urlid: '/capacityAriculturalSideline',
      url: 'v1/agriculturalProductValue/query',
      met: 'get'
    },
    // 各农副产品今年产量及产值对比
    {
      urlid: '/comparisonSidelineYear',
      url: 'v1/agriculturalProductValue/query',
      met: 'get'
    },
    // 月销售总量及总金额统计
    {
      urlid: '/monthlyTotalAmountStatistics',
      url: 'v1/agriculturalProductSales/queryTotalAmount',
      met: 'get'
    },
    // 月销售总量及总金额统计
    {
      urlid: '/monthlySalesAgriculturalProducts',
      url: 'v1/agriculturalProductSales/querySalesVolume',
      met: 'get'
    },
    // monthlySalesAmountProducts
    // 月销售总量及总金额统计
    {
      urlid: '/monthlySalesAmountProducts',
      url: 'v1/agriculturalProductSales/querySalesAmount',
      met: 'get'
    },
    // 查询人员组织情况
    {
      urlid: '/proportionOrganizations',
      url: 'v1/personnelDistribution/query',
      met: 'get'
    },
    // 查询人员组织情况总数,获取返回数据的data.totalNumber
    {
      urlid: '/peoplenum',
      url: 'v1/personnelDistribution/query',
      met: 'get'
    },
    // 学历情况
    {
      urlid: '/educationalBackground',
      url: 'v1/personnelDistribution/query',
      met: 'get'
    },
    // 职称情况
    {
      urlid: '/professionalTitle',
      url: 'v1/personnelDistribution/query',
      met: 'get'
    },
    // 各设施面积对比
    {
      urlid: '/areaComparisonFacilities',
      url: 'v1/facility/query',
      met: 'get'
    },
    // 主要品种种养数量及占比
    {
      urlid: '/proportionOfMainVarieties',
      url: 'v1/plantingBreeding/query',
      met: 'get'
    },
    // 各类型农机数量占比
    {
      urlid: '/typesAgriculturalMachinery',
      url: 'v1/agriculturalMachineryType/query',
      met: 'get'
    },
    // 今年各类型产业客流量占比
    {
      urlid: '/passengerVariousIndustries',
      url: 'pf/getPassengerFlow',
      met: 'get'
    },
    // 今年各类型产业客流量占比
    {
      urlid: '/outputVariousIndustries',
      url: 'pf/getOutput',
      met: 'get'
    },
    // 农产品价格走势及对比
    {
      urlid: '/trendComparisonProducts',
      url: 'pf/getPassengerCount',
      met: 'get'
    },
    // 今年客流量来源地情况（柱状图）
    {
      urlid: '/sourcePassengerFlow',
      url: 'pf/getSource',
      met: 'get'
    },
    // 今年游客年龄段分布情况(饼状图，柱状图)
    {
      urlid: '/ageSegmentationTourists',
      url: 'pf/getAge',
      met: 'get'
    },
    // 今年病虫害发生率占比(饼状图)
    {
      urlid: '/percentageDiseases',
      url: 'insect/pieChart',
      met: 'post'
    },
    // 今年游客年龄段分布情况(柱状图)
    {
      urlid: '/cumulativeDiseasesPestsYear',
      url: 'insect/pieChart',
      met: 'post'
    },
    // 农产品价格走势及对比
    {
      urlid: '/priceTrendComparison',
      url: 'v1/agriculturalProSalesTrend/query',
      met: 'get'
    },
    // 农产品销售价格排行
    {
      urlid: '/rankingAgriculturalProducts',
      url: 'v1/agriculturalProSalesTrend/salesAmountRankingList',
      met: 'get'
    },
    // 月度销量与产值情况(柱状图)
    {
      urlid: '/monthlySalesVolumeOutput',
      url: 'v1/statistics/queryMonthSalesStatistics',
      met: 'get'
    },
    // 季度销售量与产值情况(柱状图)
    {
      urlid: '/quarterlySalesVolumeOutput',
      url: '/v1/statistics/queryQuarterSalesStatistics',
      met: 'get'
    },
    // 年度销量与产值情况(柱状图)
    {
      urlid: '/annualSalesVolumeOutput',
      url: '/v1/statistics/queryYearSalesStatistics',
      met: 'get'
    },
    // 农产品销售占比及金额(饼状图)
    {
      urlid: '/amountAgriculturalSales',
      url: '/v1/statistics/queryProductSalesProportion',
      met: 'get'
    },
    // 线上线下销售占比金额(饼状图)
    {
      urlid: '/amountOnlineOfflineSales',
      url: 'v1/statistics/query',
      met: 'get'
    },
    // 销售对象(饼状图)
    {
      urlid: '/customerAgeAnalysis',
      url: 'v1/passengerAgeDistribution/query',
      met: 'get'
    },
    // 各类型作业数量及占比
    {
      urlid: '/variousTypesOperations',
      url: 'at/getAgriculturalTaskTypeNum',
      met: 'get'
    },
    // 今年各类型产业情况
    {
      urlid: '/productiontypeandinfo',
      url: 'agriculturalTourism/queryByCondition',
      met: 'post'
    },
    // 产业介绍
    {
      urlid: '/productionintroduce',
      url: 'industryDetails/queryByCondition',
      met: 'post'
    },
    // 今年病害发生列表
    {
      urlid: '/diseasedata',
      url: 'disease/queryByCondition',
      met: 'post'
    },
    // 今年虫害发生列表
    {
      urlid: '/insectdata',
      url: 'insect/queryByCondition',
      met: 'post'
    },
    // 农事类型
    {
      urlid: '/agritasktype',
      url: 'at/getAgriculturalTaskType',
      met: 'get'
    },
    // 农事类型数据
    {
      urlid: '/agritasktypedata',
      url: 'at/getAgriculturalTaskTypeData',
      met: 'get'
    },
    // 农事作业信息
    {
      urlid: '/agritaskinfo',
      url: 'at/getAgriculturalTaskInfo',
      met: 'post'
    },
    // // 获取投入类型
    // {
    //   urlid: '/inputstype',
    //   url: 'v1/inputType/query',
    //   met: 'get'
    // },
    // 获取投入类型数据
    {
      urlid: '/inputsdata',
      url: 'v1/inputType/query',
      met: 'get'
    },
    // 环境实时数据
    {
      urlid: '/alarminfo',
      url: 'erd/showLastDataByOrgId',
      met: 'get'
    },
    // 物联环境数据情况（有问题）
    {
      urlid: '/envirdata',
      url: 'iot/showAverageDataByFacilityId',
      met: 'get'
    },
    // horizontalPictures
    // 类型岗位数量
    {
      urlid: '/servicetech',
      url: 'v1/postType/queryPostTypeNumber',
      met: 'get'
    },
    // 告警
    {
      urlid: '/alarmContent',
      url: 'v1/alarm/query',
      met: 'get'
    },
    // 产品介绍
    {
      urlid: '/productiondes',
      url: 'v1/agriculturalProduct/query',
      met: 'get'
    }
  ]
  var comMes
  // console.log(urlid)
  comList.forEach((item) => {
    if (item.urlid === urlid) {
      // module.exports = file => () => import('@/components/tpc1-other/' + file + '.vue')
      comMes = {
        urlid: item.urlid,
        url: 'cockpit-ensemble/' + item.url,
        met: item.met
      }
    }
  })
  return comMes
}
